﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace WindStyle.SPEntity.Attributes
{
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class FieldAttribute : Attribute
    {
        public String FieldName { get; protected set; }

        public MappingMode Mode { get; protected set; }

        public FieldAttribute(string fieldName, MappingMode mode = MappingMode.ReadWrite)
        {
            this.FieldName = fieldName;
            this.Mode = mode;
        }
    }

    public enum MappingMode
    {
        ReadOnly,
        ReadWrite
    }
}
